package com.github.aloxc.plugin.restplus.i18n;

import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.project.Project;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;

public final class CommonExtensionsKt {
    public static final <T> T getService(@NotNull Class service) {
        Intrinsics.checkParameterIsNotNull(service, "service");
        return (T) ServiceManager.getService(service);
    }


    public static final <T> T getService(@NotNull Class service, @NotNull Project project) {
        Intrinsics.checkParameterIsNotNull(service, "service");
        Intrinsics.checkParameterIsNotNull(project, "project");
        return (T) ServiceManager.getService(project, service);
    }
}
